import request from '@/utils/request'

export function getClientList(params) {
  return request({
    url: '/clients',
    params
  })
}

export function addClient(data) {
  return request({
    url: '/clients',
    method: 'post',
    data
  })
}

export function searchClient(id) {
  return request({
    url: '/clients/' + id
  })
}

export function delClient(id) {
  return request({
    url: '/clients/' + id,
    method: 'delete'
  })
}

export function editClient(data) {
  return request({
    url: '/clients/' + data.id,
    method: 'put',
    data
  })
}

export function getClientNum(params) {
  return request({
    url: '/clients/count',
    params
  })
}
